package com.itheima.test;

import java.time.DayOfWeek;
import java.time.LocalDateTime;

public class Demo_010 {
    public static void main(String[] args) {
        /*
        public int getYear()获取年
        public int getMonthValue()获取月份（1-12）
        public int getDayOfMonth()获取月份中的第几天（1-31）
        public int getDayOfYear()获取一年中的第几天（1-366）
        public DayOfWeek getDayOfWeek()获取星期
        public int getMinute()获取分钟
        public int getHour()获取小时
         */
        LocalDateTime localDateTime = LocalDateTime.now();
        int year = localDateTime.getYear();
        System.out.println(year);
        int monthValue = localDateTime.getMonthValue();
        System.out.println(monthValue);
        int dayOfMonth = localDateTime.getDayOfMonth();
        System.out.println(dayOfMonth);
        int dayOfYear = localDateTime.getDayOfYear();
        System.out.println(dayOfYear);
        DayOfWeek dayOfWeek = localDateTime.getDayOfWeek();
        System.out.println(dayOfWeek);
        int minute = localDateTime.getMinute();
        System.out.println(minute);
        int hour = localDateTime.getHour();
        System.out.println(hour);
    }
}
